package com.sojson.project.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.sojson.project.dao.HotelOrderRoomDao;
import com.sojson.project.entity.po.HotelOrderRoom;
import com.sojson.project.service.HotelOrderRoomService;

/**
 * 入驻记录房间信息Service实现类
 * 
 * @author liu
 * @date 2021-07-02
 */
@Service
public class HotelOrderRoomServiceImpl implements HotelOrderRoomService {

    @Resource
    private HotelOrderRoomDao hotelOrderRoomDaoImpl;

    /**
     * 单条插入
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int insert(HotelOrderRoom hotelOrderRoom) {
        int insert = hotelOrderRoomDaoImpl.insert(hotelOrderRoom);
        return insert;
    }

    /**
     * 批量插入
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int insertList(HotelOrderRoom hotelOrderRoom) {
        int insertList = hotelOrderRoomDaoImpl.insertList(hotelOrderRoom.getHotelOrderRooms());
        return insertList;
    }

    /**
     * 通过对象批量删除(物理删除)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int deleteByDto(HotelOrderRoom hotelOrderRoom) {
        int deleteByDto = hotelOrderRoomDaoImpl.deleteByDto(hotelOrderRoom);
        return deleteByDto;
    }

    /**
     * 统计全部数量
     * 
     * @return
     */
    @Override
    public int countAll() {
        int countAll = hotelOrderRoomDaoImpl.countAll();
        return countAll;
    }

    /**
     * 查询所有
     * 
     * @return
     */
    @Override
    public List<HotelOrderRoom> listAll() {
        List<HotelOrderRoom> findAll = hotelOrderRoomDaoImpl.listAll();
        return findAll;
    }

    /**
     * 根据对象统计数量
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int countByDto(HotelOrderRoom hotelOrderRoom) {
        int countByDto = hotelOrderRoomDaoImpl.countByDto(hotelOrderRoom);
        return countByDto;
    }

    /**
     * 根据对象查询
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public List<HotelOrderRoom> listByDto(HotelOrderRoom hotelOrderRoom) {
        List<HotelOrderRoom> findByDto = hotelOrderRoomDaoImpl.listByDto(hotelOrderRoom);
        return findByDto;
    }

    /**
     * 通过id删除(物理删除)
     * 
     * @param id
     * @return
     */
    @Override
    public int deleteById(Integer id) {
        int deleteById = hotelOrderRoomDaoImpl.deleteById(id);
        return deleteById;
    }

    /**
     * 通过id数组删除(物理删除)
     * 
     * @param ids
     * @return
     */
    @Override
    public int deleteByIds(Integer[] ids) {
        int deleteByIds = hotelOrderRoomDaoImpl.deleteByIds(ids);
        return deleteByIds;
    }

    /**
     * 通过id更新(全部更新)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateAllById(HotelOrderRoom hotelOrderRoom) {
        int updateAllById = hotelOrderRoomDaoImpl.updateAllById(hotelOrderRoom);
        return updateAllById;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容相同)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateAllByIdList(HotelOrderRoom hotelOrderRoom) {
        int updateAllByIdList = hotelOrderRoomDaoImpl.updateAllByIdList(hotelOrderRoom);
        return updateAllByIdList;
    }

    /**
     * 通过id列表更新(全部更新)(更新内容不相同)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateDtoListAllById(HotelOrderRoom hotelOrderRoom) {
        int updateDtoListAllById = hotelOrderRoomDaoImpl.updateDtoListAllById(hotelOrderRoom.getHotelOrderRooms());
        return updateDtoListAllById;
    }

    /**
     * 通过id更新(局部更新)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateById(HotelOrderRoom hotelOrderRoom) {
        int updateById = hotelOrderRoomDaoImpl.updateById(hotelOrderRoom);
        return updateById;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容相同)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateByIdList(HotelOrderRoom hotelOrderRoom) {
        int updateByIdList = hotelOrderRoomDaoImpl.updateByIdList(hotelOrderRoom);
        return updateByIdList;
    }

    /**
     * 通过id列表更新(局部更新)(更新内容不相同)
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public int updateDtoListById(HotelOrderRoom hotelOrderRoom) {
        int updateDtoListById = hotelOrderRoomDaoImpl.updateDtoListById(hotelOrderRoom.getHotelOrderRooms());
        return updateDtoListById;
    }

    /**
     * 通过id查询
     * 
     * @param id
     * @return
     */
    @Override
    public HotelOrderRoom findById(Integer id) {
        HotelOrderRoom findById = hotelOrderRoomDaoImpl.findById(id);
        return findById;
    }

    /**
     * 通过id数组查询
     * 
     * @param ids
     * @return
     */
    @Override
    public List<HotelOrderRoom> findByIds(Integer[] ids) {
        List<HotelOrderRoom> findByIds = hotelOrderRoomDaoImpl.findByIds(ids);
        return findByIds;
    }

    /**
     * 通过对象查询id列表
     * 
     * @param hotelOrderRoom
     * @return
     */
    @Override
    public List<Integer> findIdByDto(HotelOrderRoom hotelOrderRoom) {
        List<Integer> findIdByDto = hotelOrderRoomDaoImpl.findIdByDto(hotelOrderRoom);
        return findIdByDto;
    }

    /**
     * 清空数据(物理清空)
     */
    @Override
    public int clear() {
        return hotelOrderRoomDaoImpl.clear();
    }

    /**
     * 通过入住记录编号查询
     * 
     * @param noHotelOrder
     * @return
     */
    @Override
    public HotelOrderRoom findByNoHotelOrder(String noHotelOrder) {
        return hotelOrderRoomDaoImpl.findByNoHotelOrder(noHotelOrder);
    }

}